package com.danciyixue.boot.client.series.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.danciyixue.boot.common.result.PageResult;
import com.danciyixue.boot.dcyx.model.query.SeriesQuery;
import com.danciyixue.boot.dcyx.model.vo.SeriesVO;
import com.danciyixue.boot.dcyx.service.SeriesService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 客户端系列控制层
 */
@Tag(name = "03. 系列", description = "系列")
@RestController
@RequestMapping("/api/client/v1/series")
@RequiredArgsConstructor
public class DcyxSeriesController {

    private final SeriesService seriesService;

    /**
     * 根据 semester_id 查询 series 列表
     */
    @GetMapping("/page")
    public PageResult<SeriesVO> page(SeriesQuery seriesQuery) {
        IPage<SeriesVO> res =  seriesService.getSeriesPage(seriesQuery);
        return PageResult.success(res);
    }

}
